{% extends "admin/base_site.html" %}
{% load i18n static %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "adminlite_dist/css/app.css" %}">{% endblock %}

{% block coltype %}colMS{% endblock %}

{% block bodyclass %}{{ block.super }} dashboard{% endblock %}

{% block content_title %} {% trans 'dashboard' %} {% endblock %}

{% block breadcrumbs %}
<ol class="breadcrumb">
    <li><a href="{% url 'admin:index' %}"><i class="fa fa-dashboard"></i> {% trans 'Home' %}</a></li>
    <li class="active">{% trans 'dashboard' %}</li>
</ol>
{% endblock %}

{% block content %}
<div id="content-main">
    {% if app_list %}
    <div class="row">
        <div class="col-md-9 col-sm-12 col-xs-12">
            <div class="box col-md-6 ">
                <div class="box-body no-padding">
                    {% for app in app_list %}

                    <h3 class="box-title">{{ app.name }}</h3>
                    <table class="table table-condensed">
                        <tbody>
                        {% for model in app.models %}
                        <tr>
                            {% if model.admin_url %}
                            <td style="width: 200px;"><a href="{{ model.admin_url }}">{{ model.name }}</a></td>
                            {% else %}
                            <td style="width: 200px;">{{ model.name }}</td>
                            {% endif %}
                            {% if model.add_url %}
                            <td style="width: 50px;"><a href="{{ model.add_url }}" class="addlink">{% trans 'Add' %}</a></td>
                            {% else %}
                            <td>&nbsp;</td>
                            {% endif %}
                            {% if model.admin_url %}
                            {% if model.view_only %}
                            <td><a href="{{ model.admin_url }}" class="viewlink">{% trans 'View' %}</a></td>
                            {% else %}
                            <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
                            {% endif %}
                            {% else %}
                            <td>&nbsp;</td>
                            {% endif %}
                        </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                    {% endfor %}
                </div>
                <!-- /.box-body -->
            </div>


            <!--<div class="row">-->
            <!--<div class="col-lg-3 col-xs-6">-->
            <!--&lt;!&ndash; small box &ndash;&gt;-->
            <!--<div class="small-box bg-aqua">-->
            <!--<div class="inner">-->
            <!--<h3>{{ app_list|length }}</h3>-->

            <!--<p>{% trans 'My Applications' %}</p>-->
            <!--</div>-->
            <!--<div class="icon">-->
            <!--<i class="ion ion-bag"></i>-->
            <!--</div>-->
            <!--<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>-->
            <!--</div>-->
            <!--</div>-->
            <!--<div class="col-lg-3 col-xs-6">-->
            <!--&lt;!&ndash; small box &ndash;&gt;-->
            <!--<div class="small-box bg-green">-->
            <!--<div class="inner">-->
            <!--<h3>53<sup style="font-size: 20px">%</sup></h3>-->

            <!--<p>{% trans 'My tables' %}</p>-->
            <!--</div>-->
            <!--<div class="icon">-->
            <!--<i class="ion ion-stats-bars"></i>-->
            <!--</div>-->
            <!--<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>-->
            <!--</div>-->
            <!--</div>-->
            <!--<div class="col-lg-3 col-xs-6">-->
            <!--&lt;!&ndash; small box &ndash;&gt;-->
            <!--<div class="small-box bg-yellow">-->
            <!--<div class="inner">-->
            <!--<h3>44</h3>-->

            <!--<p>User Registrations</p>-->
            <!--</div>-->
            <!--<div class="icon">-->
            <!--<i class="ion ion-person-add"></i>-->
            <!--</div>-->
            <!--<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>-->
            <!--</div>-->
            <!--</div>-->
            <!--<div class="col-lg-3 col-xs-6">-->
            <!--&lt;!&ndash; small box &ndash;&gt;-->
            <!--<div class="small-box bg-red">-->
            <!--<div class="inner">-->
            <!--<h3>65</h3>-->

            <!--<p>Unique Visitors</p>-->
            <!--</div>-->
            <!--<div class="icon">-->
            <!--<i class="ion ion-pie-graph"></i>-->
            <!--</div>-->
            <!--<a href="#" class="small-box-footer">-->
            <!--More info <i class="fa fa-arrow-circle-right"></i>-->
            <!--</a>-->
            <!--</div>-->
            <!--</div>-->
        </div>
        {% else %}
        <div class="row"><div class="col-md-12">{% trans "You don't have permission to view or edit anything." %}</div></div>
        {% endif %}

    </div>
    {% endblock %}
</div>